feat: support the all tag to enable every rule - #1514
Open
bartlomieju wants to merge 1 commit into
Open
Conversation
Add a special `all` tag to `filtered_rules` that matches every rule regardless of the rule's own tags, so a config can opt into the full rule set with `tags: ["all"]` instead of listing each rule by name. Combine it with `exclude` to drop individual rules. Refs #1244
Member
Author
|
Verdict: LGTM — correct and tested. Recommend merge (public-behavior change, so flagging rather than auto-merging; needs green CI / rebase). Correctness — good
Minor
Perf: neutral/slightly better (short-circuit on Housekeeping: public API/behavior addition → maintainer sign-off (your own PR). No changes requested. Good to merge once CI is green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1244.
Adds a special
alltag tofiltered_rules: when the requested tag setcontains
all, every rule matches regardless of its own tags. This lets aconfiguration opt into the complete rule set with
{ "lint": { "rules": { "tags": ["all"] } } }instead of enumerating every rule under
include. It composes with theexisting
excludelist to drop individual rules, e.g.tags: ["all"]+exclude: ["no-explicit-any"].This is the deno_lint-side primitive only. Two related ideas from the issue
are intentionally out of scope here and can build on top of this:
tags: ["all", "-fresh"]) — needs the config layer inthe Deno CLI to map the negated tag onto excludes;
Adds tests for
allalone (returns every rule) andall+exclude.